import { defineStore } from 'pinia'
const userName = sessionStorage.getItem('userName')

export const useUser = defineStore('user', {
  state: () => {
    return {
      userName,
    }
  },
  actions: {
    modifyUserName(data){
      this.userName = data
      sessionStorage.setItem('userName', data)
    }
  },
})